package com.changgou.user.feign;

import com.changgou.entity.Result;
import com.changgou.user.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(name = "user")
@RequestMapping("/user")
public interface UserFeign {

    @GetMapping("/load/{username}")
    User findUserInfo(@PathVariable("username") String username);

    @GetMapping(value = "/findbyqq/{qq}" )
    User findByQQ(@PathVariable("qq") String qq);

    /***
     * 新增数据
     * @param user
     * @return
     */
    @PostMapping
    Result add(@RequestBody User user);
}
